package com.github.aloxc.plugin.restplus.i18n;

import com.intellij.CommonBundle;

import java.util.Locale;
import java.util.ResourceBundle;
/**
 *
 * @author leero
 */
public class I18Bundle {
    private static I18Config i18Config = new I18Config();
    private static ResourceBundle resourceBundle = ResourceBundle.getBundle("messages.rest",
            new Locale(i18Config.getLocale()), new XmlControl());

    public static String getMessage(String key) {
        return resourceBundle.getString(key).trim();
    }
    public static String getMessage(String key,String any) {
        return CommonBundle.message(resourceBundle,key,any).trim();
    }
}
